﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace VoicePhone.Controls
{
    public class BaseButton : Button
    {
        private int DeviceId { get; set; }
        public BaseButton()
        {
            //this.TouchLeave += BaseButton_TouchLeave;
            //this.TouchMove += BaseButton_TouchMove;
            //this.TouchUp += BaseButton_TouchUp;
        }

        private void BaseButton_TouchUp(object sender, System.Windows.Input.TouchEventArgs e)
        {
            base.OnClick();
        }

        private void BaseButton_TouchMove(object sender, System.Windows.Input.TouchEventArgs e)
        {
            this.IsPressed = true;
        }

        private void BaseButton_TouchLeave(object sender, System.Windows.Input.TouchEventArgs e)
        {
            this.IsPressed = false;
        }


        public CornerRadius CornerRadiusBase
        {
            get { return (CornerRadius)GetValue(CornerRadiusBaseProperty); }
            set { SetValue(CornerRadiusBaseProperty, value); }
        }

        // Using a DependencyProperty as the backing store for CornerRadiusBase.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty CornerRadiusBaseProperty =
            DependencyProperty.Register("CornerRadiusBase", typeof(CornerRadius), typeof(BaseButton), new PropertyMetadata(new CornerRadius(5)));
    }
}
